/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.lm.entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Robson Motta
 */
@Entity
@Table(name = "ctrl_modulo")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "CtrlModulo.findAll", query = "SELECT c FROM CtrlModulo c"),
    @NamedQuery(name = "CtrlModulo.findByIdModulo", query = "SELECT c FROM CtrlModulo c WHERE c.idModulo = :idModulo")})
public class CtrlModulo implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE)
    @SequenceGenerator(name = "Ctrl_Modulo_id_modulo_seq", sequenceName = "Ctrl_Modulo_id_modulo_seq", initialValue = 1, allocationSize = 1)
    @Basic(optional = false)
    @Column(name = "id_modulo")
    private Integer idModulo;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 100)
    @Column(name = "dsc_modulo")
    private String dscModulo;
    @Size(max = 200)
    @Column(name = "apl_modulo")
    private String aplModulo;
    @Column(name = "pred_modulo")
    private Integer predModulo;
    @Column(name = "apl_modulo_type")
    private Character aplModuloType;
    @Size(max = 70)
    @Column(name = "menuitem_actionlistener")
    private String menuitemActionlistener;
    @Size(max = 70)
    @Column(name = "menuitem_update")
    private String menuitemUpdate;
    @Size(max = 50)
    @Column(name = "menuitem_icon")
    private String menuitemIcon;
    @Size(max = 70)
    @Column(name = "menuitem_onclick")
    private String menuitemOnclick;
    @Column(name = "menuitem_ajax")
    private Boolean menuitemAjax;

    public CtrlModulo() {
    }

    public CtrlModulo(Integer idModulo) {
        this.idModulo = idModulo;
    }

    public CtrlModulo(Integer idModulo, String dscModulo) {
        this.idModulo = idModulo;
        this.dscModulo = dscModulo;
    }

    public Integer getIdModulo() {
        return idModulo;
    }

    public void setIdModulo(Integer idModulo) {
        this.idModulo = idModulo;
    }

    public String getDscModulo() {
        return dscModulo;
    }

    public void setDscModulo(String dscModulo) {
        this.dscModulo = dscModulo;
    }

    public String getAplModulo() {
        return aplModulo;
    }

    public void setAplModulo(String aplModulo) {
        this.aplModulo = aplModulo;
    }

    public Integer getPredModulo() {
        return predModulo;
    }

    public void setPredModulo(Integer predModulo) {
        this.predModulo = predModulo;
    }

    public Character getAplModuloType() {
        return aplModuloType;
    }

    public void setAplModuloType(Character aplModuloType) {
        this.aplModuloType = aplModuloType;
    }

    public String getMenuitemActionlistener() {
        return menuitemActionlistener;
    }

    public void setMenuitemActionlistener(String menuitemActionlistener) {
        this.menuitemActionlistener = menuitemActionlistener;
    }

    public String getMenuitemUpdate() {
        return menuitemUpdate;
    }

    public void setMenuitemUpdate(String menuitemUpdate) {
        this.menuitemUpdate = menuitemUpdate;
    }

    public String getMenuitemIcon() {
        return menuitemIcon;
    }

    public void setMenuitemIcon(String menuitemIcon) {
        this.menuitemIcon = menuitemIcon;
    }

    public String getMenuitemOnclick() {
        return menuitemOnclick;
    }

    public void setMenuitemOnclick(String menuitemOnclick) {
        this.menuitemOnclick = menuitemOnclick;
    }

    public Boolean getMenuitemAjax() {
        return menuitemAjax;
    }

    public void setMenuitemAjax(Boolean menuitemAjax) {
        this.menuitemAjax = menuitemAjax;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idModulo != null ? idModulo.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof CtrlModulo)) {
            return false;
        }
        CtrlModulo other = (CtrlModulo) object;
        if ((this.idModulo == null && other.idModulo != null) || (this.idModulo != null && !this.idModulo.equals(other.idModulo))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "br.com.lm.entity.CtrlModulo[ idModulo=" + idModulo + " ]";
    }
    
}
